<?php

namespace App\Services\Entity\Impl;

use App\Models\User;
use App\Services\Entity\UserService;

class UserServiceImpl implements UserService
{
    /**
     * 用户注册
     * @param $username
     * @param $password
     * @param $salt
     * @return array|mixed
     */
    public function register($username, $password, $salt)
    {
        $user = new User();
        $user->username = $username;
        $user->password = $password;
        $user->salt = $salt;
        $user->save();
        return arrResponse($user);
    }
}
